//----------------------------------------------------------------
//	NPythonBind Lib
//
//	Base Object Define
//
//	Author: Neil Fang
//	Date:	March,2008
//----------------------------------------------------------------
#pragma once
#include "NClass.h"

class NObject;

/**
 *	The Base Object class
*/
class NObject : public PyObject
{
public:
	NObject(void);
	virtual ~NObject(void);

	int addRef(void)
	{
		Py_INCREF(this);
		return static_cast<int>(PyObject::ob_refcnt);
	}
	int release(void)
	{
		int ret = static_cast<int>(PyObject::ob_refcnt);
		Py_DECREF(this);
		return ret-1;
	}

public:
	static void exportClass(void);
	static NClassBase* getClass(void)	{	return &m_classNObject; }
	static NClass<NObject, PyObject>	m_classNObject;
};
